//
//  BaseTableViewCell.m
//  YiCuiMiaoZhang
//
//  Created by Sings on 2019/3/28.
//  Copyright © 2018 益萃网络科技（中国）有限公司. All rights reserved.
//

#import "BaseTableViewCell.h"
#import "BZThemeKeyConst.h"

@implementation BaseTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style
              reuseIdentifier:(NSString *)reuseIdentifier {
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        BZTHEME_COLOR(skin_content_bg_color,self,backgroundColor);
//        BZTHEME_COLOR(skin_content_bg_color,self.contentView,backgroundColor);
    }
    return self;
}

- (void)setViewModel:(BaseViewModel *)viewModel {
    if (_viewModel) {
        _viewModel.refresh = nil;
    }
    _viewModel = viewModel;
    [self showView];
    BaseWeakObj(self)
    _viewModel.refresh = ^{
        [weakself showView];
    };
}

- (void)showView {
}

@end
